﻿namespace FiftyOne.Foundation.Mobile.Detection.Wurfl.Handlers
{
    using FiftyOne.Foundation.Mobile.Detection.Wurfl;
    using System;

    internal class WindowsCEHandler : EditDistanceHandler
    {
        private const string DEFAULT_DEVICE = "ms_mobile_browser_ver1";

        protected internal override bool CanHandle(string userAgent)
        {
            return (userAgent.Contains("Mozilla/") && userAgent.Contains("Windows CE"));
        }

        internal override DeviceInfo DefaultDevice
        {
            get
            {
                DeviceInfo deviceInfoFromID = Provider.Instance.GetDeviceInfoFromID("ms_mobile_browser_ver1");
                if (deviceInfoFromID != null)
                {
                    return deviceInfoFromID;
                }
                return base.DefaultDevice;
            }
        }
    }
}

